<?php
namespace app\apiadmin\controller;

use app\apiadmin\BaseController;
use app\common\service\admin\AdminService;

/**
 * 管理员
 */
class Admin extends BaseController
{
    /**
     * 管理员登录
     * 
     * @return mixed
     */
    public function getAdminAll()
    {
        $param = $this->request->param("", "", "trim");

        try {
            $result = (new AdminService())->getAdminAll($param);

            return json(successful($result));
        } catch (\Exception $e) {
            return json(errorful($e->getMessage()));
        }
    }
}
